<?php
namespace app\home\model;
use think\Model;

class FinanceModel extends Model
{
	protected $table  = 'qm_finance';


	//添加一条财务日志
	public function addFinance($data)
	{
		$res = $this->insertGetId($data);
		return $res;
	}



	//用户-查看财务日志列表
	public function getMemberFinanceList($where, $page = 1, $field = '*')
	{
		$keys = ($page - 1) * 10;
		$limit = 10;
		$list = $this->where($where)->field($field)->limit($keys, $limit)->order('add_time DESC')->select();
		if(!empty($list))
		{
			$list = $list->toArray();
		}
		return $list;
	}


}